package crud.client.service;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import crud.client.data.Colonne;
import crud.client.data.ColonneToOne;
import crud.client.data.DataView;
import crud.client.data.LigneDonnee;
import crud.client.data.Table;
import crud.client.data.authentication.User;

@RemoteServiceRelativePath("CRUD.rpc")
public interface CRUDService extends RemoteService
{

	public List<Table> getTableList();
	
    public List<DataView> getTableCatalogue(String codeTable);
    public List<Colonne> getColonneList(Table table);
 	public List<LigneDonnee> getDonneeLineList(Table table, List<Colonne> colonneList);
 	public List<DataView> getDataList(ColonneToOne colonneToOne);

	void updateData(Table table, List<LigneDonnee> donneeListToDelete, List<LigneDonnee> donneeListToSave);

	boolean isDataUsed(Table table, LigneDonnee ligneDonneeToCheck);

	DataView getLigneCatalogue(String codeTable, String codeDetail);

	String getLibelleCatalogue(String codeTable, String codeDetail);

	List<DataView> getEmptyDataViewListCallback();
	
	User authenticate(String login, String password);
	Boolean authenticationRequired();
	
	User getAuthenticatedUser();



}